//导入路由组件
// import Home from "@/pages/Home"
// import Login from "@/pages/Login"
// import Register from "@/pages/Register"
// import Search from "@/pages/Search"
// import Detail from "@/pages/Detail"
// import AddCarSuccess from "@/pages/AddCarSuccess"
// import ShopCart from "@/pages/ShopCart"
// import Center from "@/pages/Center"
// import Pay from "@/pages/Pay"
// import PaySuccess from "@/pages/PaySuccess"
// import Trade from "@/pages/Trade"
// 路由懒加载
const Home = () => import("@/pages/Home")
const Login =()=>import("@/pages/Login")
const Register=()=>import("@/pages/Register")
const Search=()=>import("@/pages/Search")
const Detail=()=>import ("@/pages/Detail")
const AddCarSuccess=()=>import("@/pages/AddCarSuccess")
const ShopCart=()=>import("@/pages/ShopCart")
const Center=()=>import("@/pages/Center")
const Pay=()=>import("@/pages/Pay")
const PaySuccess=()=>import("@/pages/PaySuccess")
const Trade=()=>import("@/pages/Trade")
// 配置路由
export default [
    {
        name: "home",
        path: "/home",
        component: Home,
        meta: {
            isHiddenTypeNav: true
        }
    },
    {
        name: "login",
        path: "/login",
        component: Login,
        meta: {
            isHiddenFooter: true
        }
    },
    {
        name: "register",
        path: "/register",
        component: Register,
        meta: {
            isHiddenFooter: true
        }
    },
    {
        name: "search",
        path: "/search/:keyword?",
        component: Search,

    },
    {
        name: "detail",
        path: "/detail/:skuId",
        component: Detail,
        props: true

    },
    {
        name: "addcarsuccess",
        path: "/addcarsuccess",
        component: AddCarSuccess,
    },
    {
        name: "shopcart",
        path: "/shopcart",
        component: ShopCart,
    },
    {
        name: "center",
        path: "/center",
        component: Center,
    },
    {
        name: "pay",
        path: "/pay",
        component: Pay,
    },
    {
        name: "paysuccess",
        path: "/paysuccess",
        component: PaySuccess,
    },
    {
        name: "trade",
        path: "/trade",
        component: Trade,
    },
    {
        path: "/",
        redirect: "/home" //默认路径
    },

]



